<template>
  <t-image-viewer v-if="!store.isMobileType" v-model:visible="ImgVisible" :images="[urls + props.info.value]">
  </t-image-viewer>
  <van-image-preview :show-index="false" v-else v-model:show="ImgVisible" :images="[urls + props.info.value]">
  </van-image-preview>
  <div class="outline-parent jy-style-height">
    <div class="flex-box border-hover-style">
      <div class="Showroom-parent" v-if="props.info.digitalShowroom">
        <digitalShowroomInfo :url="props.info.digitalShowroom" :id="props.info.id" />
      </div>
      <img
        class="outline-parent-bg"
        :src="publicUrls + 'free/style6/Level2outlineStyle3Bg.webp'"
        alt=""
      />
      <div class="outline">
        <div class="outline-content">
          <div class="content-box">
            <span>{{ props.info.text }}</span>
          </div>
          <div class="content-box-left" v-if="props.info.value || props.info.subTitle || props.info.remarks">
            <div class="outline-subTitle" v-if="props.info.subTitle">——{{ props.info.subTitle }}</div>
            <div class="cover" v-if="props.info.value" @click="ImgVisible = true">
              <img class="outline-cover" :src="urls + props.info.value + '?imageView2/3/format/webp'" alt="" />
            </div>
            <TextMax
              v-if="props.domShow"
              :data="props.info.remarks"
              :title="props.info.text"
              :row="props.info.value ? 8 : !props.info.value && !props.info.subTitle ? 16 : 13"
            ></TextMax>
          </div>
          <!-- Level2outlinestyle1CoverBg -->
        </div>
      </div>
    </div>
  </div>
</template> 

<script lang="ts">
export default defineComponent({
  name: 'free6Style3',
});
</script>

<script setup lang="ts">
import { publicUrls } from '@/utils/minxin';
import digitalShowroomInfo from '@/freeComponents/unitdigitalShowroom/style6.vue';
import textMode from '../../../textMode/textMode.vue';
import { urls } from '@/utils/request/upload';
import TextMax from '@/freeComponents/textMode/TextMax.vue';
import { defineComponent, ref } from 'vue';
import { useProjectStore } from '@/store';
const store = useProjectStore();

const ImgVisible = ref(false);

const props = defineProps({
  info: {
    type: Object,
  },
  domShow: {
    type: Boolean,
  },
});

// 跳转全景链接
const open = (url: any) => {
  if (url) {
    window.open(url, '_blank');
  }
};
</script>

<style scoped lang="less">
.outline-parent {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  margin-right: 280px;
}
.flex-box {
  width: 540px;
  height: 774px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.outline-parent-bg {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}
.outline {
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding-right: 78px;
  padding-left: 42px;
}
.outline-content {
  display: flex;
  justify-content: center;
  width: 457px;
  height: 606px;
}
.content-box {
  display: flex;
  justify-content: center;
  align-items: start;
  width: 45px;
  height: 100%;
  position: relative;
  padding-top: 30px;
  &::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20px;
    width: 29px;
    height: 472px;
    background: url(https://static.jiyi.show/free/style6/level2style3titlebg.webp) no-repeat center/100% 100%;
  }
  span {
    width: 100%;
    padding: 20px 0;
    font-family: SourceHanSerifCN-Bold;
    text-align: center;
    writing-mode: vertical-rl;
    letter-spacing: 4px;
    color: #737d87; 
    font-size: 24px;
    line-height: 50px;
  }
}
.content-box-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 43px;
  padding-bottom: 30px;
  padding-left: 30px;
  flex: 1;
  height: 100%;
}
.outline-subTitle {
  width: 100%;
  color: #686763;
  font-family: 'SourceHanSerifCN';
  font-size: 17px;
  line-height: 28px;
  margin-bottom: 20px;
}
.cover {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-height: 520px;
  flex: 1;
  margin-bottom: 20px;
  overflow: hidden;
  &:hover .outline-cover {
    transform: scale(1.2);
  }
  .outline-cover {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: rgba(104, 103, 99, 0.1);
    transition: all 0.3s ease;
  }
}

.Showroom-parent {
  position: absolute;
  bottom: 115px;
  left: 45px;
  z-index: 21;
}
::v-deep .van-text-ellipsis {
  font-family: PingFang SC !important;
  font-size: 16px !important;
  color: #686763 !important;
  line-height: 32px !important;
}
::v-deep .van-text-ellipsis__action::before {
  color: #737d87 !important;
  font-weight: 800 !important;
}
::v-deep .t-popup__content {
  background: #56677b;
  padding: 2px 12px;
  font-family: 'Microsoft YaHei';
  font-size: 13px;
  line-height: 20px;
  color: #f1efea;
  box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.25);
  margin-top: 6px !important;
}
::v-deep .t-popup__arrow::before {
  background: #56677b;
  border: none;
  box-shadow: none !important;
}
</style>